package cn.shuibo.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/***
 * api加密信息配置
 *
 * @author 飞龙
 * @date 2024年3月12日
 */
@ConfigurationProperties(prefix = "rsa.encrypt")
@Configuration
public class SecretKeyConfig {

    /***
     * 私钥
     * 用于接口参数信息解密
     */
    private String privateKey;

    /***
     * 公钥
     * 用于接口响应数据加密
     */
    private String publicKey;

    /***
     * 字符配置
     */
    private String charset = "UTF-8";

    /**
     * 是否开启接口加密
     */
    private boolean open = true;

    /***
     * 是否打印日志
     */
    private boolean showLog = false;

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public boolean isShowLog() {
        return showLog;
    }

    public void setShowLog(boolean showLog) {
        this.showLog = showLog;
    }
}
